<?php

	function pr($str, $exitpage = 0){
		echo '<pre style=" direction: ltr; text-align: left; color:#000; display: block; clear: both;">';
		if ($exitpage == 0) {
			print_r($str);
		} else {
			print_r($str);
			exit();
		}
		echo '</pre>';
	}

// Configuration System Dir AND Constants and reserved names 
	define('NAMESPACE_OF_SYSTEM', 'Phptricks');
	define('DS', DIRECTORY_SEPARATOR);
	if (!DIRECTORY_SEPARATOR) {
		define('DS', '/');
	}

	
	$document_root = '';
	if (function_exists('dirname')) {
		$document_path = rtrim(dirname(__DIR__), DS);
	} else {
		$document_root = filter_input(INPUT_SERVER, 'CONTEXT_DOCUMENT_ROOT') . DS;
	}

	$base_site_url = $_SERVER['REQUEST_SCHEME'] . ":" . DS . DS . $_SERVER['SERVER_NAME'];
// config dirs
	define('SYSTEMPATH', 'system' . DS);
	define('APPPATH', 'app' . DS);
	define('DOCUMENT_ROOT', realpath($document_root) . DS);
	define('SITE_URL', $base_site_url . DS . \str_replace(filter_input(INPUT_SERVER, 'CONTEXT_DOCUMENT_ROOT') . DS, '', DOCUMENT_ROOT));


	/**
	 * @param String cp_name<p>
	 * Control Panel Name
	 * </p>
	 * @return String Name of Control Panel.
	 */
	define('cp_name', 'admin');

	/**
	 * @param String EXT<p>
	 * extension file name
	 * </p>
	 * @return String extension of file.
	 */
	define('EXT', ".php");

//	exit();
?>